#include "Bochka.h"

Bochka::Bochka(size_t size, double spirt_value)
{
	m_size = size;
	m_spirt_value = spirt_value;
}

double Bochka::Get_m_spirt_value()
{
	return m_spirt_value;
}

void Bochka::Pereliv(Bochka& other, const int value_other)
{
	m_spirt_value = (m_size * m_spirt_value + value_other * other.m_spirt_value) / (m_size + value_other);
	m_size++;
	other.m_size--;
}
